<template>
  <el-row style="">
    <el-card class="box-card" style="height:250px">
      <div slot="header" class="clearfix my-el_header">
        <span style="font-size:16px">项目详情</span>
      </div>

      <el-row>
        <el-col :span="11" v-for="(o,index) in projectDetail" :key="'projectDetail'+index" class="text item" style="margin:8px;font-size:14px">
          <el-col :span="6">
            {{o.colLabel +':'}}
          </el-col>
          <el-col :span="18">
            {{o.projectName}}
          </el-col>
        </el-col>
      </el-row>
    </el-card>
  </el-row>

</template>

<script>
// 项目详情组件
export default {
  name: 'projectDetail',
  props: {
    projectinfos: {},
    projectId: Number
  },
  // mixins: [mixin_list],
  data() {
    return {
      ownProjectinfos: this.projectinfos,
      projectDetail: []
    }
  },

  methods: {
    getProjectInfo() {
      var projectDetail = [
        { colLabel: '项目名称', projectName: this.ownProjectinfos.name },
        { colLabel: '项目级别', projectName: this.ownProjectinfos.dispprojectlevel },
        { colLabel: '计划开始', projectName: this.ownProjectinfos.planstarttime },
        { colLabel: '预计工时', projectName: this.ownProjectinfos.mandays + '/人天' },
        { colLabel: '项目说明', projectName: this.ownProjectinfos.overview },
        { colLabel: '项目类型', projectName: this.ownProjectinfos.dispcategory },
        { colLabel: '计划完工', projectName: this.ownProjectinfos.planendtime },
        { colLabel: '项目项目预算', projectName: '￥' + this.ownProjectinfos.budgetmoney },
        { colLabel: '备注', projectName: this.ownProjectinfos.remark }
      ]
      this.projectDetail = projectDetail
    }
  },
  watch: {
    projectinfos(newValue, oldValue) {
      this.ownProjectinfos = newValue
      this.getProjectInfo()
    },
    projectId(newValue, oldValue) {
      console.log(newValue)
    }
  },
  created() {},
  mounted() {
    this.getProjectInfo()
    console.log(this.projectinfos.id)
  }
}
</script>

<style  scoped>
</style>
